package com.recruit.wechat.controller.homeinterface;

import com.recruit.wechat.controller.BaseController;
import com.recruit.wechat.controller.entity.ApiCode;
import com.recruit.wechat.controller.helper.$;
import com.recruit.wechat.controller.model.ApiResultModel;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @author LF
 * @date 2020/9/1 - 10:38
 */
@RestController
@RequestMapping("/WeChatUser/HomeInterface")
public class HomeInterfaceController extends BaseController {

    /** 获取职位类型
     * @return 返回统一信息
     */
    @RequestMapping(value = "admin/getHotJobs")
    public ApiResultModel getHotJobs(){
        List<List<Map<String, Object>>> wechatIndustries = wechatIndustryService.hotJobs(0);
        return $.success(ApiCode.success,ApiCode.success_msg,wechatIndustries);
    }

    /** 获取热门公司
     * @return 返回统一信息
     */
    @RequestMapping(value = "admin/getHotCompany")
    public ApiResultModel hotCompanys(){
        return wechatCompanyService.hotCompanys();
    }

    /** 获取热门职位
     * @return 返回统一信息
     */
    @RequestMapping(value = "admin/getHotIndustry")
    public ApiResultModel hotIndustry(){
        return wechatPositionService.getHotIndustry();
    }







}




